HipEventQueue

High efficient(at least memory-wise), tightly packed Input queue that supports any kind of data in a single allocated memory pool(no fragmentation).

The input queue is populated by external APIs, like UWP's CoreWindow, Android's app and SDL2 Event. This way, it is possible to create a centralized input resource. This class does not creates the entire input system. It creates its base for being handled.

Constructors

this
this(uint touchStructsCapacity)
Undocumented in source.

Members

Aliases

clear
alias clear = EventQueue.clear
Undocumented in source.
poll
alias poll = EventQueue.poll
Undocumented in source.
post
alias post = EventQueue.post
Undocumented in source.

Enums

EventType
enum EventType
Undocumented in source.

Functions

poll
InputEvent* poll()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

clear
void clear(uint id)
Undocumented in source. Be warned that the author may not have intended to support it.
newController
HipEventQueue newController(uint touchStructsCapacity)
Undocumented in source. Be warned that the author may not have intended to support it.
poll
InputEvent* poll(uint id)

Polls an input event for a specified controller

post
void post(uint id, EventType type, T ev)

External API used for getting the input events inside an internal queue. This way the API can remains the same

post
void post(uint id, EventType type, Gamepad ev)

External API used for getting the input events inside an internal queue. This way the API can remains the same

Static variables

controllers
HipEventQueue[] controllers;

This class should probably not contain more than one instance(unless 2 people are playing)

Structs

Gamepad
struct Gamepad
Undocumented in source.
InputEvent
struct InputEvent
Undocumented in source.
Key
struct Key
Undocumented in source.
Resize
struct Resize
Undocumented in source.
Scroll
struct Scroll
Undocumented in source.
Touch
struct Touch
Undocumented in source.

Inherited Members

From EventQueue

Event
struct Event
Undocumented in source.
eventQueue
void* eventQueue;

Linearly allocated variable length Events

bytesCapacity
uint bytesCapacity;

BytesOffset should never be greater than capacity

bytesOffset
uint bytesOffset;
Undocumented in source.
pollCursor
uint pollCursor;
Undocumented in source.
post
void post(ubyte type, T ev)
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
poll
Event* poll()
Undocumented in source. Be warned that the author may not have intended to support it.
~this
~this()
Undocumented in source.

Meta